package com.cloudfun.campusshare.repo;

import com.cloudfun.campusshare.entity.WashPointEntity;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;

import java.util.Collection;
import java.util.List;
import java.util.Set;

/**
 * @author : zhangyongjie
 * @version : 1.0
 * @createTime : 2020/4/28 19:28
 * @description :
 */
@Repository
public interface WashPointEntityRepo extends JpaRepository<WashPointEntity,String>, JpaSpecificationExecutor<WashPointEntity> {

    List<WashPointEntity> findAllByMerchantIdAndIdIn(String merchantId, Collection<String> ids);

    List<WashPointEntity> findAllByMerchantId(String merchantId);

    List<WashPointEntity> findAllByCreatorIdInAndIdIn(Collection<String> creatorIds,Collection<String> ids);

    List<WashPointEntity> findAllByCreatorIdIn(Set<String> creatorIds);
}
